package com.api.wall.geteventproperties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.test.context.ContextConfiguration;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import com.api.test.AbstractApiTest;
import com.zyncro.api.IWallApiService;
import com.zyncro.api.exceptions.ZyncroApiException;

@ContextConfiguration(locations = "classpath:/wall/wall-static.xml")
public class GetEventPropertiesNotParticipant extends AbstractApiTest {

	@Value("#{group_toGetComments[externalUser].appId}")
	private String userUrn;

	@Value("#{group_toGetComments[externalUser].password}")
	private String userPassword;

	@Value("#{group_toGetComments.eventUrn}")
	private String eventUrn;

	@BeforeClass
	protected void setParameters() throws Exception {

		getApi().login(userUrn, userPassword);
	}

	@Test(expectedExceptions = ZyncroApiException.class)
	public void testGetEventProperties() throws ZyncroApiException {

		int pageNumber = 0;
		int itemsPerPage = 0;

		getApi().getService(IWallApiService.class).getEventProperties(eventUrn, pageNumber, itemsPerPage);
	}
}
